//
// Created by jsjxsy on 2022/8/17.
//
#include <iostream>
using namespace std;

double division(int a, int b) {
  if (b == 0) {
    throw "Division by zero condition!";
  }
  return (a / b);
}

int main(void) {
  int x = 50;
  int y = 0;
  double z = 0;

  try {
    z = division(x, y);
    cout << z << endl;
  } catch (const char *msg) {
    cerr << msg << endl;
  } catch (const bad_alloc &e) {

  }catch (const logic_error &e) {

  } catch (const runtime_error &e) {

  } catch (const exception &e) {

  }

  return 0;
}
